Configuring Message Session Relay Protocol

The device supports Message Session Relay Protocol (MSRP), which is a text-based protocol for exchanging a series of related instant messages (IM) across an IP network (TCP or TLS only) in the context of a session. The protocol can also be used to transfer large files or images, or share remote desktops or whiteboards. MSRP is typically required for Next Generation 911 (NG911) services, allowing 911 callers to not only access 911 services through voice calls, but also through text messages with Public Safety Answering Points (PSAPs). The device's MSRP support is in accordance with RFC 4975 (The Message Session Relay Protocol (MSRP)) and RFC 6135 (An Alternative Connection Model for the Message Session Relay Protocol (MSRP)). The device also supports secure MSRP sessions (MSRPS), using TLS certificates (TLS Context).

MSRP is applicable only to the SBC application.

The device establishes MSRP sessions using the SDP offer/answer negotiation model over SIP. The MSRP session starts with a SIP INVITE and ends with a SIP BYE message. As a B2BUA, the device interoperates between the MSRP endpoints, terminating the incoming MSRP message on the inbound leg and then generating a new MSRP message on the outbound leg. Before sending the INVITE, the device manipulates the SDP body (e.g., 'a=path', 'c=', 'm=', 'a=setup' and 'a=fingerprint' lines). The device can perform optional message manipulation and other translations such as resolving NAT traversal when the endpoints or device are located behind NAT.

An example of an SDP body with the fields for MSRP negotiation in the INVITE message is shown below:

INVITE sip:alice@atlanta.example.com SIP/2.0
To: <sip:bob@biloxi.example.com>
From: <sip:alice@atlanta.example.com>;tag=786
Call-ID: 3413an89KU
Content-Type: application/sdp

c=IN IP4 atlanta.example.com
m=message 7654 TCP/MSRP *
a=accept-types:text/plain
a=path:msrp://atlanta.example.com:7654/jshA7weztas;tcp
a=setup:active

Where,

'c=' line ignores IP address and port
'm=' line indicates an MSRP message
'a=accept-types:' line lists allowed content types
'a=path:msrp:' line indicates the URI to where the messages are to be sent
'a=setup' line indicates the MSRP role (active UA initiates connection; passive UA listens on port)

If secured MSRP (MSRPS) is required (i.e., incoming SDP contains 'm=' line with 'TCP/TLS/MSRP' value, 'a=path' with 'msrps', and 'a=fingerprint'), during MSRP session establishment, the device enforces the validity of the fingerprint from the TLS handshake (public key) with the fingerprint in the received SDP. When the device establishes a secured MSRP session, the offered fingerprint is obtained from the TLS Context, which is assigned to the IP Profile of the endpoint.

The device handles MSRP sessions as follows:

1. When the device receives an INVITE message with the MSRP offer, it initiates an SDP offer to the destination endpoint on the outgoing leg. Before sending the INVITE message, the device does the following:
Uses the configured MSRP TCP or MSRP TLS port (SIP Interface) in the SDP 'm=' line.
Uses the IP address (SDP 'c=' line) of the associated IP Interface (SIP Interface).
Sets the 'a=setup' line to the configured preferred MSRP role of the device.
2. When the device receives the MSRP answer from the destination endpoint, it sends an SDP answer to the dialog-initiating endpoint. Before sending the INVITE message, the device does the following:
If the device has chosen a TCP server role, it selects the listening port configured for MSRP in the associated SIP Interface. The port number is included in the media line of the SDP.
The device includes the IP address of the associated IP Interface in the 'c=' line of the SDP.
Sets the 'a=setup' line to the device's negotiated role.

Once SDP negotiation between the UAs is complete and the MSRP session is being established, the device initiates a TCP/TLS connection (or waits to be initiated) on each leg, depending on SDP negotiation. Once a TCP/TLS connection is established, the endpoints can start sending MSRP messages using MSRP SEND requests, as shown in the following example:

MSRP a786hjs2 SEND
To-Path: msrp://biloxi.example.com:12763/kjhd37s2s20w2a;tcp
From-Path: msrp://atlanta.example.com:7654/jshA7weztas;tcp
Message-ID: 87652491
Byte-Range: 1-25/25
Content-Type: text/plain

Hey Bob, are you there?
-------a786hjs2$

The MSRP payload or content (i.e., the actual message) follows the Content-Type header. Finally, the SEND request is closed with an end-line of seven hyphens, the Transaction ID, and one of the following symbols:

$: The request contains the final part of the message (end).
+: The request doesn't contain the final part of the message ($), but is only part of a series of messages.
#: The sender is aborting an incomplete message and intends to send no further chunks in that message (message should be discarded).

An example of a basic MSRP flow is shown below:

MSRP is not supported with other media types (i.e., voice) in the same SDP session.
MSRP is supported on IPv4 and IPv6 networks.
The Call Admission Control (CAC) mechanism handles MSRP sessions as regular media sessions (i.e., they are not calculated and monitored separately from regular media calls).
CDRs generated by the device for MSRP calls include the value "msrp" in the Media List CDR field.

The following procedure provides the basic steps for configuring MSRP.

To configure MSRP:
1. Enable MSRP functionality:
a. Open the Media Settings page (Setup menu > Signaling & Media tab > Media folder > Media Settings).
b. From the 'Enable MSRP' drop-down list, select Enable.

c. Click Apply, and then restart the device with a burn-to-flash for your settings to take effect.
2. Configure the MSRP endpoint's IP Profile:
a. Open the IP Profiles table (see Configuring IP Profiles).
b. Configure the following (in addition to other IP Profile settings):
From the 'SBC Media Security Mode' drop-down list, select the transport protocol for the outgoing leg - Secured or Both for MSRPS (example below); Not Secured for MSRP.

From the 'MSRP Offer Setup Role' drop-down list, select the MSRP role mode in SDP negotiations ('a=setup' line). The device's role is according to the response: If 'a=setup passive', it’s the "active" role; if 'a=setup active', it’s the "passive" role. If no 'a=setup' in the response, it’s the "active" role.

In the 'Data DiffServ' field, configure the DiffServ value of MSRP traffic ('m=message').

From the 'MSRP re-INVITE/UPDATE' drop-down list, select if the destination MSRP endpoint supports the receipt of re-INVITE requests and UPDATE messages.

From the 'MSRP Empty Message Format' drop-down list, select if the device must add a Content-Type header to empty MSRP messages that are used to initiate the connection.

If you want to implement alternative routing if the MSRP endpoints don't establish an MSRP connection within a specific timeout (configured by the 'Timeout to Establish MSRP Connection' global parameter) or if the MSRP socket is closed after the call was established, then from the 'Broken Connection Mode' drop-down list, select Reroute or Reroute with Original SIP Headers:

For more information on the Broken Connection feature, see the description of the 'Broken Connection Mode' parameter in Configuring IP Profiles.

a. Click Apply.
3. Configure the SIP Interface for the MSRP endpoint:
a. Open the SIP Interfaces table (see Configuring SIP Interfaces).
b. In the 'MSRP TCP Port' field and 'MSRP TLS Port' field, configure a single TCP and/or TLS port number, respectively. The port number is used in the SDP's 'a=path' line.

c. Click Apply.
For secured MSRP (MSRPS), the TLS Context assigned to the SIP Interface ('TLS Context Name' field) is used.
The IP Interface assigned to the SIP Interface is used for the MSRP sessions.
4. Configure the timeout for establishing the MSRP connection through the MSRP port. If the timeout expires and the connection has yet to be established, the device ends the SIP session.
a. Open the Media Settings page (Setup menu > Signaling & Media tab > Media folder > Media Settings).
b. In the 'Timeout to Establish MSRP Connection' field, enter the timeout:

c. Click Apply.
5. For NAT traversal of MSRP sessions when the device is located behind NAT, use the NAT Translation table (see Configuring NAT Translation per IP Interface). The target IP address:port (public) is used in the SDP's 'a=path' line.